package com.example.user_module.user;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.viewbinding.ViewBinding;

import com.alibaba.android.arouter.launcher.ARouter;
import com.example.base_application_sdk.BaseApplication;
import com.example.common.mvvm.view.BaseFragment;
import com.example.user_module.databinding.FragmentUserBinding;

public class UserFragment extends BaseFragment<FragmentUserBinding,UserViewModel> {

    @Override
    public View bindLayout() {
        return v.getRoot();
    }

    @Override
    public ViewBinding initBinding() {
        FragmentUserBinding  fragmentUserBinding=FragmentUserBinding.inflate(inflater);
        return fragmentUserBinding;
    }

    @Override
    public void initView() {

    }

    @Override
    public void initData() {
        v.userLogion.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(BaseApplication.getInstance(), "跳转登录界面", Toast.LENGTH_SHORT).show();
                ARouter.getInstance().build("/user/loginactivity").navigation();
            }
        });
    }
}
